<template>
  <a-form
      layout="vertical"
      :model="activeData.props"
      name="basic"
      autocomplete="off"
      @finish="onFinish"
      @finishFailed="onFinishFailed"
  >
    <a-form-item
        label="标题"
        name="title"
        :rules="[{ required: true, message: '请输入标题内容' }]"
    >
      <a-input v-model:value="activeData.props.title" :disabled="activeData.isLocked"/>
    </a-form-item>
    <a-form-item
        label="Placeholder"
        name="placeholder"
    >
      <a-textarea v-model:value="activeData.props.placeholder" :disabled="activeData.isLocked"/>
    </a-form-item>
  </a-form>
</template>

<script setup>
import useQuestion from "../../hooks/useQuestion.js";
const {activeData} = useQuestion()
const onFinish = (values) => {
  console.log('Success:', values);
};

const onFinishFailed = (errorInfo) => {
  console.log('Failed:', errorInfo);
};
</script>

<style scoped>

</style>
